<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>获得焦点元素</title>
	<style>
		input {
			outline: none;
		}

		input:focus {
			background-color: pink;
			border: 1px solid red;
			height: 40px;
			font-size: 16px;
		}
	</style>
</head>
<body>
	<input type="text" name="text">
</body>
</html>